package com.ggh.jinjilive.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;

import com.cy.dialog.BaseDialog;
import com.ggh.jinjilive.R;
import com.ggh.jinjilive.listener.AddItemOnClickListener;

public class LiveOccludeDialog extends BaseDialog {


    public LiveOccludeDialog(Context context) {
        super(context);
    }

    public LiveOccludeDialog(Context context, int themeResId) {
        super(context, themeResId);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        contentView(R.layout.dialog_live_occlude);
        canceledOnTouchOutside(false);
        gravity(Gravity.CENTER);
        animType(BaseDialog.AnimInType.CENTER);
        //取消
        findViewById(R.id.button_shut).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        //确认
        findViewById(R.id.button_confirm).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if(null != addItemOnClickListener){
                    addItemOnClickListener.onSkipClicked(0,"关闭");
                }
            }
        });
    }


    private AddItemOnClickListener addItemOnClickListener;
    public void setAddItemOnClickListener(AddItemOnClickListener addItemOnClickListener){
        this.addItemOnClickListener = addItemOnClickListener;
    }

}
